<template>
    <div>
        <strong style="font-size: 32px;">账号</strong>
        <br>
        <span>用户名:
            <input type="text" v-model="username">
        </span>
        <br>
        <span>头像:
            <input type="text" v-model="avatar">
        </span>
        <br>
        <span>Email Address:
            <input type="text" v-model="email">
        </span>
        <br>
        <span>账户绑定与解绑
            <span>微信</span>
            <span>QQ</span>
        </span>
        <br>
        <span>
            <button @click="addmessage">更新账号</button>
        </span>
    </div>
</template>
<script setup>
import request from '@/request';
import { ElMessage } from 'element-plus'
import { ref, reactive } from 'vue';
const username = ref('')
const avatar = ref('')
const email = ref('')
function addmessage() {
    request({
        method: 'post',
        url: '/account/',
        data: {
            username: username.value,
            avatar: avatar.value,
            email: email.value
        }
    }).then(response => {
        if (response.status == 200) {
            ElMessage.success('添加数据信息成功')
        }
    }).catch(error => {
        ElMessage.error('错误信息' + error)
    })
}
</script>
<style scoped></style>